<template>
  <div class="app">
    <h1>APP组件: {{ name }} -- {{ price }}</h1>
    <Child></Child>
  </div>
</template>

<script>
import Child from './components/Child';
import { provide, reactive, toRefs } from 'vue';

export default {
  name: 'App',
  components: { Child },
  setup() {
    let car = reactive({
      name: '奔驰',
      price: '40W'
    })

    provide('app-car', car);

    return {
      ...toRefs(car)
    }
  }
}
</script>

<style>
.app {
  background-color: aqua;
  padding: 20px;
}
</style>
